3.5 \(\int \frac{(a+b x^2) (A+B x^2)}{x^2} \, dx\)

Optimal. Leaf size=26 \[ x (a B+A b)-\frac{a A}{x}+\frac{1}{3} b B x^3 \]

[Out]

-((a*A)/x) + (A*b + a*B)*x + (b*B*x^3)/3

________________________________________________________________________________________

Rubi [A]  time = 0.0164823, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.056, Rules used = {448} \[ x (a B+A b)-\frac{a A}{x}+\frac{1}{3} b B x^3 \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x^2)*(A + B*x^2))/x^2,x]

[Out]

-((a*A)/x) + (A*b + a*B)*x + (b*B*x^3)/3

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rubi steps

\begin{align*} \int \frac{\left (a+b x^2\right ) \left (A+B x^2\right )}{x^2} \, dx &=\int \left (A b \left (1+\frac{a B}{A b}\right )+\frac{a A}{x^2}+b B x^2\right ) \, dx\\ &=-\frac{a A}{x}+(A b+a B) x+\frac{1}{3} b B x^3\\ \end{align*}

Mathematica [A]  time = 0.0088594, size = 26, normalized size = 1. \[ x (a B+A b)-\frac{a A}{x}+\frac{1}{3} b B x^3 \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x^2)*(A + B*x^2))/x^2,x]

[Out]

-((a*A)/x) + (A*b + a*B)*x + (b*B*x^3)/3

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 24, normalized size = 0.9 \begin{align*}{\frac{bB{x}^{3}}{3}}+Abx+Bax-{\frac{Aa}{x}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)*(B*x^2+A)/x^2,x)

[Out]

1/3*b*B*x^3+A*b*x+B*a*x-a*A/x

________________________________________________________________________________________

Maxima [A]  time = 1.00229, size = 32, normalized size = 1.23 \begin{align*} \frac{1}{3} \, B b x^{3} +{\left (B a + A b\right )} x - \frac{A a}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(B*x^2+A)/x^2,x, algorithm="maxima")

[Out]

1/3*B*b*x^3 + (B*a + A*b)*x - A*a/x

________________________________________________________________________________________

Fricas [A]  time = 1.43145, size = 61, normalized size = 2.35 \begin{align*} \frac{B b x^{4} + 3 \,{\left (B a + A b\right )} x^{2} - 3 \, A a}{3 \, x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(B*x^2+A)/x^2,x, algorithm="fricas")

[Out]

1/3*(B*b*x^4 + 3*(B*a + A*b)*x^2 - 3*A*a)/x

________________________________________________________________________________________

Sympy [A]  time = 0.245351, size = 20, normalized size = 0.77 \begin{align*} - \frac{A a}{x} + \frac{B b x^{3}}{3} + x \left (A b + B a\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)*(B*x**2+A)/x**2,x)

[Out]

-A*a/x + B*b*x**3/3 + x*(A*b + B*a)

________________________________________________________________________________________

Giac [A]  time = 1.18391, size = 31, normalized size = 1.19 \begin{align*} \frac{1}{3} \, B b x^{3} + B a x + A b x - \frac{A a}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(B*x^2+A)/x^2,x, algorithm="giac")

[Out]

1/3*B*b*x^3 + B*a*x + A*b*x - A*a/x